/**
 * ${table.comment!} 查询
 * @props handleSearch
 * @props prodTreeSelectData
 */

import React from "react";
import { Form, Button, Input } from "antd";
import { FormValidItem} from "win-trade-base";

class ${entity}SearchForm extends React.Component {
    handleReset = () => {
        this.props.form.resetFields();
        this.props.handleSearch();
    };

    render() {
        const { getFieldDecorator } = this.props.form;

        return (
            <Form layout="inline" className="search-form">
                <FormValidItem label="参数1">
                    {getFieldDecorator("param", {})(
                        <Input style={{ width: 200}}/>
                    )}
                </FormValidItem>

                <FormValidItem>
                    <Button
                        type="primary"
                        icon="search"
                        onClick={this.props.handleSearch}
                    >
                        查询
                    </Button>
                </FormValidItem>
                <FormValidItem>
                    <Button icon="sync" onClick={this.handleReset}>重置</Button>
                </FormValidItem>
            </Form >
        );
    }
}

export default Form.create()(${entity}SearchForm);